import axios from "@/util/http";

//post
export function postActionFrom(url, parameter) {
  return axios({
    url: url,
    method: "post",
    data: parameter,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded",
    },
  });
}
export function postAction(url, parameter, headers) {
  return axios({
    url: url,
    method: "post",
    data: parameter,
  });
}

//get
export function getAction(url, parameter) {
  return axios({
    url: url,
    method: "get",
    params: parameter,
  });
}

//deleteAction
export function deleteAction(url, parameter) {
  return axios({
    url: url,
    method: "delete",
    params: parameter,
  });
}
